<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Interpréteur:  Fichier source de Lecteur.h</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Interpréteur
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Généré par Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Recherche');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Page&#160;principale</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Fichiers</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Recherche" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>Liste&#160;des&#160;fichiers</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">Lecteur.h</div>  </div>
</div>
<div class="contents">
<a href="_lecteur_8h.html">Aller à la documentation de ce fichier.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 ﻿#ifndef LECTEUR_H_
<a name="l00002"></a>00002 <span class="preprocessor">#define LECTEUR_H_</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &quot;Symbole.h&quot;</span>
<a name="l00005"></a>00005 <span class="preprocessor">#include &quot;LecteurSymbole.h&quot;</span>
<a name="l00006"></a>00006 <span class="preprocessor">#include &quot;TableSymboles.h&quot;</span>
<a name="l00007"></a>00007 <span class="preprocessor">#include &quot;Arbre.h&quot;</span>
<a name="l00008"></a>00008 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00009"></a>00009 
<a name="l00021"></a>00021 <span class="keyword">using namespace </span>std;
<a name="l00022"></a>00022 
<a name="l00023"></a><a class="code" href="class_lecteur.html">00023</a> <span class="keyword">class </span><a class="code" href="class_lecteur.html">Lecteur</a>
<a name="l00024"></a>00024 {
<a name="l00025"></a>00025     <span class="keyword">protected</span>:
<a name="l00026"></a>00026                 LecteurSymbole* ls;
<a name="l00027"></a>00027                 Noeud* arbre;
<a name="l00028"></a>00028                 TableSymboles ts;
<a name="l00029"></a>00029     <span class="keyword">public</span>:
<a name="l00030"></a>00030         
<a name="l00037"></a>00037         <a class="code" href="class_lecteur.html">Lecteur</a>(<span class="keywordtype">string</span> fich);
<a name="l00038"></a>00038                 
<a name="l00045"></a>00045         <a class="code" href="class_lecteur.html">Lecteur</a>(LecteurSymbole* lecs);
<a name="l00046"></a>00046         
<a name="l00052"></a><a class="code" href="class_lecteur.html#ade99e3f98b4080ba5954d0256f84b6fa">00052</a>                 <span class="keyword">virtual</span> <a class="code" href="class_lecteur.html#ade99e3f98b4080ba5954d0256f84b6fa" title="Destructeur virtuel de Lecteur.">~Lecteur</a>() {}
<a name="l00060"></a>00060         <span class="keyword">virtual</span> Noeud* seqInst();                       <span class="comment">// &lt;seq_inst&gt; ::=  &lt;inst&gt; ; { &lt;inst&gt; ; }</span>
<a name="l00061"></a>00061 
<a name="l00070"></a>00070         <span class="keyword">virtual</span> Noeud* inst();          <span class="comment">// &lt;inst&gt;       ::= &lt;affectation&gt; | &lt;instSi&gt; | &lt;instTq&gt; | &lt;instRepeter&gt;</span>
<a name="l00071"></a>00071                 
<a name="l00080"></a>00080                 <span class="keyword">virtual</span> Noeud* affectation();   <span class="comment">// &lt;affectation&gt;::= &lt;variable&gt; = ( &lt;expression&gt; )</span>
<a name="l00081"></a>00081                 
<a name="l00090"></a>00090                 Noeud* expression();    <span class="comment">// &lt;expression&gt; ::= &lt;terme&gt; { &lt;opAdd&gt; &lt;terme&gt; }</span>
<a name="l00091"></a>00091                 
<a name="l00100"></a>00100                 Noeud* facteur();               <span class="comment">// &lt;facteur&gt;    ::= &lt;entier&gt; | &lt;variable&gt; | &lt;opUnaire&gt; &lt;expBool&gt; | ( &lt;expBool&gt; ) | &lt;chaine&gt;</span>
<a name="l00101"></a>00101                 
<a name="l00110"></a>00110                 Noeud* terme();         <span class="comment">// &lt;terme&gt;      ::= &lt;facteur&gt; { &lt;opMult&gt; &lt;facteur&gt; }</span>
<a name="l00111"></a>00111                 
<a name="l00120"></a>00120                 Symbole opAdd();                <span class="comment">// &lt;opAdd&gt;      ::= + | -</span>
<a name="l00121"></a>00121                 
<a name="l00130"></a>00130                 Symbole opMult();               <span class="comment">// &lt;opMult&gt;     ::= * | /</span>
<a name="l00131"></a>00131 
<a name="l00140"></a>00140                 Noeud* expBool();               <span class="comment">// &lt;expBool&gt;    ::= &lt;expBoolEt&gt; { &lt;opBoolOu&gt; &lt;expBoolEt&gt; }</span>
<a name="l00141"></a>00141                 
<a name="l00149"></a>00149                 Noeud* expBoolEt();     <span class="comment">// &lt;expBoolEt&gt;  ::= &lt;relation&gt; {&lt;opBoolEt&gt; &lt;relation&gt; }</span>
<a name="l00150"></a>00150                 
<a name="l00159"></a>00159                 Symbole opBoolEt();     <span class="comment">// &lt;opBool&gt;     ::= et</span>
<a name="l00160"></a>00160                 
<a name="l00169"></a>00169                 Symbole opBoolOu();     <span class="comment">// &lt;opBool&gt;     ::= ou</span>
<a name="l00170"></a>00170                 
<a name="l00179"></a>00179                 Noeud* relation();      <span class="comment">// &lt;relation&gt;   ::= &lt;expression&gt; { &lt;opRel&gt; &lt;expression&gt; }</span>
<a name="l00180"></a>00180                 
<a name="l00189"></a>00189                 Symbole opRel();                <span class="comment">// &lt;opRel&gt;      ::=  == | != | &lt; | &lt;= | &gt; | &gt;=</span>
<a name="l00190"></a>00190                 
<a name="l00199"></a>00199                 Symbole opUnaire();     <span class="comment">// &lt;opUnaire&gt;   ::=   - | non</span>
<a name="l00200"></a>00200 
<a name="l00209"></a>00209                 Noeud* instSi();                <span class="comment">// &lt;instSi&gt;     ::= si ( &lt;expBool&gt; ) alors &lt;seqInst&gt; { sinonsi ( &lt;expBool&gt; ) alors &lt;seqInst&gt; } [ sinon &lt;seqInst&gt; ] finsi</span>
<a name="l00210"></a>00210                 
<a name="l00219"></a>00219                 Noeud* instTq();                <span class="comment">// &lt;instTq&gt;     ::= tantque ( &lt;expBool&gt; ) faire &lt;seqInst&gt; fintantque</span>
<a name="l00220"></a>00220                 
<a name="l00229"></a>00229                 Noeud*  instRepeter();  <span class="comment">// &lt;instRepeter&gt; ::= repeter &lt;seqInst&gt; jusqua ( &lt;expBool&gt; )</span>
<a name="l00230"></a>00230                 
<a name="l00239"></a>00239                 Noeud* instPour();              <span class="comment">// &lt;instPour&gt;   ::= pour ( &lt;affectation&gt; ; &lt;expBool&gt; ; &lt;affectation&gt; ) faire &lt;seqInst&gt; finpour</span>
<a name="l00240"></a>00240 
<a name="l00241"></a>00241 
<a name="l00242"></a>00242                 <span class="comment">// Entrees - Sorties</span>
<a name="l00243"></a>00243                 
<a name="l00252"></a>00252                 Noeud* instLire();      <span class="comment">// &lt;instLire&gt;   ::= lire ( &lt;variable&gt; )</span>
<a name="l00253"></a>00253                 
<a name="l00262"></a>00262                 Noeud* instEcrire();    <span class="comment">// &lt;instEcrire&gt; ::= ecrire ( &lt;expression&gt; | &lt;chaine&gt; )</span>
<a name="l00263"></a>00263 
<a name="l00271"></a>00271                 <span class="keywordtype">void</span> testerSymCour (<span class="keywordtype">string</span> ch);  <span class="comment">// si symbole courant != ch, erreur : on arrete le programme, sinon rien</span>
<a name="l00279"></a>00279 <span class="comment"></span>        <span class="keywordtype">void</span> sauterSymCour (<span class="keywordtype">string</span> ch);  <span class="comment">// si symbole courant == ch, on passe au symbole suivant, sinon erreur : on arrete</span>
<a name="l00280"></a>00280                 
<a name="l00288"></a>00288         <span class="keywordtype">void</span> erreur (<span class="keywordtype">string</span> mess);      <span class="comment">// affiche les message d&#39;erreur mess et arrete le programme</span>
<a name="l00289"></a>00289 };
<a name="l00290"></a>00290 
<a name="l00291"></a>00291 <span class="preprocessor">#endif</span>
<a name="l00292"></a>00292 <span class="preprocessor"></span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>Tout</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Fichiers</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Fonctions</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Généré le Mercredi Janvier 4 2012 21:54:34 pour Interpréteur par &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
